package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.util.Objects;

@Entity
public class Zsidesmodelmiddle {
    private int sidesvalueMiddleid;
    private Zproductside zproductsideByPsId;
    private Zspecificationsvalue zspecificationsvalueBySpecId;


    @Id
    @Column(name = "sidesvalue_middleid")
    public int getSidesvalueMiddleid() {
        return sidesvalueMiddleid;
    }

    public void setSidesvalueMiddleid(int sidesvalueMiddleid) {
        this.sidesvalueMiddleid = sidesvalueMiddleid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Zsidesmodelmiddle that = (Zsidesmodelmiddle) o;
        return sidesvalueMiddleid == that.sidesvalueMiddleid ;
    }

    @Override
    public int hashCode() {
        return Objects.hash( sidesvalueMiddleid);
    }

    @ManyToOne
    @JoinColumn(name = "ps_id", referencedColumnName = "ps_id")
    public Zproductside getZproductsideByPsId() {
        return zproductsideByPsId;
    }

    public void setZproductsideByPsId(Zproductside zproductsideByPsId) {
        this.zproductsideByPsId = zproductsideByPsId;
    }

    @ManyToOne
    @JoinColumn(name = "spec_id", referencedColumnName = "spec_id")
    public Zspecificationsvalue getZspecificationsvalueBySpecId() {
        return zspecificationsvalueBySpecId;
    }

    public void setZspecificationsvalueBySpecId(Zspecificationsvalue zspecificationsvalueBySpecId) {
        this.zspecificationsvalueBySpecId = zspecificationsvalueBySpecId;
    }
}
